package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EaparamExt;
@SuppressWarnings("unchecked")
/**
 * eaparam
 */
public class Eaparam {
	/**
	 * PARAMID
	 */
	public String pARAMID;
	/**
	 * PARAMKEY
	 */
	public String pARAMKEY;
	/**
	 * PARAMVALUE
	 */
	public String pARAMVALUE;
	/**
	 * REMARK
	 */
	public String rEMARK;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EaparamExt DB = new EaparamExt(); 
	
	public Eaparam() {
		super();
	}
	
	public Eaparam(String pARAMID, String pARAMKEY, String pARAMVALUE, String rEMARK) {
		super();
		this.pARAMID = pARAMID; 
		this.pARAMKEY = pARAMKEY; 
		this.pARAMVALUE = pARAMVALUE; 
		this.rEMARK = rEMARK; 
	}
	
	public String getPARAMID() {
		return pARAMID;
	}

	public void setPARAMID(String pARAMID) {
		this.pARAMID = pARAMID;
	} 
	
	public String getPARAMKEY() {
		return pARAMKEY;
	}

	public void setPARAMKEY(String pARAMKEY) {
		this.pARAMKEY = pARAMKEY;
	} 
	
	public String getPARAMVALUE() {
		return pARAMVALUE;
	}

	public void setPARAMVALUE(String pARAMVALUE) {
		this.pARAMVALUE = pARAMVALUE;
	} 
	
	public String getREMARK() {
		return rEMARK;
	}

	public void setREMARK(String rEMARK) {
		this.rEMARK = rEMARK;
	} 
	
	
	public Map eaparamToMap() {
		Map map = new HashMap();
		try {
			map.put("pARAMID",this.pARAMID);
			map.put("pARAMKEY",this.pARAMKEY);
			map.put("pARAMVALUE",this.pARAMVALUE);
			map.put("rEMARK",this.rEMARK);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Eaparam mapToEaparam(Map map){
		try {
			String pARAMID =  map.get("pARAMID").toString();
			String pARAMKEY =  map.get("pARAMKEY").toString();
			String pARAMVALUE =  map.get("pARAMVALUE").toString();
			String rEMARK =  map.get("rEMARK").toString();
			Eaparam eaparam = new Eaparam(pARAMID, pARAMKEY, pARAMVALUE, rEMARK);
			return eaparam;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return eaparamToMap().toString();
	}
	
	//方便数据操作	
	public Eaparam insert(){
		return DB.insert(this);
	}
	public Eaparam update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
